package com.netease.service;

import com.netease.common.NetServiceCommon;
import com.netease.domain.ImageResponse;
import com.netease.domain.NamespaceItem;
import com.sun.tools.javac.util.Pair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

/**
 * Created by dongle on 2017/2/27.
 */
@Service
public class ImageService {
    private static String imagesUrl = "https://open.c.163.com/api/v1/microservices/images";

    @Autowired
    private NetServiceCommon netServiceCommon;

    public ImageResponse getImages() throws IOException {
        ImageResponse response = netServiceCommon.getResponse(imagesUrl, ImageResponse.class);
        return response;
    }
}
